Repository navigation
fix(libScePad): return 0 from n3kSX62fgNo after scePadInit, with a pad open or not - #7908
Merged
oneandonlydean merged 1 commit intoOct 19, 2026
Merged
Conversation
…d open or not The OS 10.01 system module checks only that the library is initialised, then sends a per-process value to ShellCore over Mbus and returns 0 when that call succeeds. It does not look at pad handles, so the throw while a pad is open is gone. 0x809200ff, measured in a process that is not a game, is the failed Mbus call; a game process is assumed to get 0.
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
scePadUnknown_n3kSX62fgNonow returns 0 afterscePadInit, whether a pad is open or not. BeforescePadInitit still returns0x80920005, now throughPAD_ERROR_NOT_INITIALIZED. I removed the throw while a pad is open, and the twoPAD_UNKNOWN_N3KSX62FGNO_*constants with it.The source is a static analysis of the OS 10.01 system module (
libScePad.sprx, pluslibSceMbus.sprxfor the function it calls). At pseudocode level:scePadOpenmakes no difference to it.mbus_setis the unnamed libSceMbus export0mRAu1IWNEA, a thin IPMI client call to ShellCore: method0xCE110066with the payload{1, getpid()}, returning the server's result. libScePad is its only importer in the OS 10.01 system modules, and this is its only call site. So the pad function sets a per-process value to 1 in ShellCore. The server side is not part of what I analysed, so what that value controls is unknown.0x809200FF.This matches the console probe in #3177 (comment, PS5 system software 13.60):
0x80920005beforescePadInit,0x809200FFafter it, no byte of therdibuffer changed, and no fault on NULL or guard-page pointers. That probe ran in a payload that is not a game process (sceUserServiceInitializefailed there too), which is where a ShellCore call would be refused. In a game process I expect ShellCore to accept it, so the function returns 0. That last step is inferred, not measured on a console, and the debt entry says so.Thanks to MarcZX10 for #5676, which put the measured statuses on
main, and to everyone in #3177 for the console probe. #5676 kept the throw for an open pad because the probe could not open one; the system module shows that an open pad does not change the result.Debt: I cut the
n3kSX62fgNoentry to what is still open (name unknown, the 0 inferred, the ShellCore setting not modelled) and removed the older entry at the end oflibScePad.md, which still said the function throws. The name is still unknown, so the export keepsscePadUnknown_n3kSX62fgNo.Overlap: #5038 also changes this function (it returns 0 unconditionally, before
scePadInittoo). It conflicts withmainsince #5676, and a reviewer asked there to drop this function from it. My other libScePad pull request (scePadGetAccessibilityControllerState,zBsgF0q8DIM) touches the same three files; the two merge cleanly in either order.Tested
Windows 10 (19045), WinLibs GCC 15.2.0, Release, Ninja,
mainf3bb6a4 plus this commit:ctest -R "^guest_pad":guest_padandguest_pad_vibration_modepass.guest_padnow checks the four states: beforescePadInit(0x80920005), afterscePadInit(0), with a pad open (0, no throw) and afterscePadClose(0).main'sExport.cppand this test,guest_padaborts at the first call afterscePadInit, wheremainreturns0x809200ff. With a pad open,mainthrowsscePadUnknown_n3kSX62fgNo not implemented, which the old test asserted.python tools/check_conventions.py --base origin/mainwith this title and body passes.I have not run any of the titles below.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)main(#5676 comment, #3965 comment). The other titles reported to import it get 0 instead of0x809200FFafterscePadInit: PPSA13356 (Exports for PPSA01530, PPSA23827 and PPSA13356 imports #3177 1, 2; does not read the result), PPSA01530 Puyo Puyo™ Tetris® 2 (PPSA01530) #6421 and PPSA23827 (Exports for PPSA01530, PPSA23827 and PPSA13356 imports #3177, fix(exports): export the calls PPSA01530, PPSA23827 and PPSA13356 import #3337), PPSA07411 (#2776 comment), PPSA01317 Gran Turismo 7 (PPSA01317) #4697 (listed in libScePad: replace NotImplemented stubs and fix return-0 consistency #5038). I have not run any of them.